<?php

class IndexController extends Controller{

	public function index(){

		if(isset($_SESSION['id'])){
			$this->assign('uid',$_SESSION);
			$this->assign('account',$_SESSION['account']);
			
		}
		// 获取分类信息
		$CatInfo = new CategoryController;
		// 获取顶级分类
		$BigCat = $CatInfo->BigCategory();
		// 分配顶级分类
		$this->assign('BigCategory',$BigCat);
		// 分配所有的分类信息
		$this->assign('All',$CatInfo->getAll());
		$whiteAsk = new AskModel;
		// p($whiteAsk);exit;
		$white = $whiteAsk->WhiteAsk();
		// 待解决问题列表
		$this->assign('white',$white);
		// p($white);
		// 高分问题
		$this->assign('golds',$whiteAsk->WhiteAskGolds());
		$this->assign('count',$whiteAsk->count());
		$this->display('index.html');
	}
	
}


?>